package cuiyt.designpattern.proxy.dynamic.jdk;

/**
 * @author cyt
 * @create 2020-07-20 14:56
 */
public class Test {

    public static void main(String[] args) {
        // 创建目标对象
        Teacher teacher = new Teacher();
        TeacherDao teacherDao = (TeacherDao) new ProxyFactory(teacher).gtProxyInstance();
        System.out.println("ProxyInstance => " + teacherDao.getClass());
        teacherDao.teacher();
    }
}
